<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>register</title>
</head>
<body>
<form action="" method="post">
    {% csrf_token %}
    <!--with 标签，等号前后不能有空格-->
    {% with errs=form.errors %}
        username: <input type="text" name="username" value="{{ form.username.value }}"><br/>
        <p>{{ errs.username }}</p>
        password: <input type="password" name="password1" value="{{ form.password1.value }}"><br/>
        <p>{{ errs.password1 }}</p>
        password_repeat: <input type="text" name="password2" value="{{ form.password2.value }}"><br/>
        <p>{{ errs.password2 }}</p>
        email: <input type="text" name="email" value="{{ form.email.value }}"><br/>
        <p>{{ errs.email }}</p>
        <input type="submit" value="Submit">
    {% endwith %}
</form>
<a href="{% url 'users:login' %}">已有账号,去登陆</a>
{#<p>{{ form }}</p>#}
</body>
</html>